package com.springcloudemo.ms.jdk;

import java.util.Iterator;
import java.util.ServiceLoader;

/**
 * @author Yangdw
 * @date 2025-08-24
 * @description:
 */
public class JDKMain {
    public static void main(String[] args) {
        ServiceLoader<JDKSPI> loader = ServiceLoader.load(JDKSPI.class);
        Iterator<JDKSPI> iterator = loader.iterator();
        while (iterator.hasNext()){
            JDKSPI next = iterator.next();

            System.out.println(next.spi());
        }

        System.out.println("加载结束");
    }
}
